FROM python:3.7

# 设置python环境变量
ENV PYTHONBUFFERED 1


# 添加debian清华镜像源
ADD sources.list /etc/apt/

RUN apt-get update
RUN apt-get install python3-dev default-libmysqlclient-dev -y

# 创建code文件夹并将其设置为工作目录
RUN mkdir /code
WORKDIR /code

# 更新pip
RUN pip install pip -U
ADD requirements.txt /code/
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

ADD . /code/

